#ifndef EGG_RENDERTARGET_H
#define EGG_RENDERTARGET_H

#include "GraphicDevice.h"

namespace egg{

    class RenderTarget{
    public:
        RenderTarget(uint32 _w,uint32 _h):mWidth(_w),mHeight(_h){}
        virtual void activate(uint32 _l,uint32 _b,uint32 _w,uint32 _h);

        inline uint32 getID(){
            return mID;
        }
        inline uint32 getWidth(){
            return mWidth;
        }
        inline uint32 getHeight(){
            return mHeight;
        }
        inline void setClearColor(
            float _r,float _g,float _b,float _a,
            bool _rm=true,bool _gm=true,bool _bm=true,bool _am=true){
                glClearColor(_r,_g,_b,_a);
                glColorMask(_rm,_gm,_bm,_am);
        }
        inline void clear(uint32 _mask){
            glClear(_mask);
        }
    protected:
        uint32 mID;
        uint32 mWidth,mHeight;
    };

    typedef shared_ptr<RenderTarget> RenderTargetPtr;

}

#endif